VT-d: make scope parsing code type safe
authorJan Beulich <jbeulich@suse.com>
Thu, 29 Nov 2012 08:14:55 +0000 (09:14 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 29 Nov 2012 08:14:55 +0000 (09:14 +0100)
commit239168fe989a5cf02b360196268fcc801f31f891
tree489aeb65eed48917449e8402d0755c8d2035a150
parent253d59d0fe4e36bedf7b01f6bf193321f673ce26
VT-d: make scope parsing code type safe

Rather than requiring the scopes to be the first members of their
respective structures (so that casts can be used to switch between the
different views), properly use types and container_of().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by Xiantao Zhang <xiantao.zhang@intel.com>
xen/drivers/passthrough/vtd/dmar.c
xen/drivers/passthrough/vtd/dmar.h